<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<jsp:include page="../jqgrid.jsp"></jsp:include>
</head>
<script type="text/javascript">
	$(document).ready(function() {
		jQuery("#loglist").jqGrid({
			url : 'querySyslog.action',
			autowidth : true,
			datatype : "json",
			colNames : [ 'id', '操作', '操作时间', '操用员ID','操用员'],
			colModel : [ {
				name : 'id',
				index : 'id',
				width : 10,
				editable : false,
				search:false
			}, {
				name : 'operation',
				index : 'operation',
				width : 50,
				editable : true,
				align : "center",
				searchoptions :{
					sopt:['cn','nc']
				}
			}, {
				name : 'operationTime',
				index : 'operationTime',
				align : "center",
				width : 50,
				editable : true,
				searchoptions:{dataInit:datePick,sopt:['le','ge']}
			}, {
				name : 'userId',
				index : 'userId',
				width : 1,
				align : "center",
				hidden:true,
				editable : true,
				search:false
			}, {
				name : 'userName',
				index : 'userName',
				width : 40,
				align : "center",
				editable : true,
				searchoptions :{
					sopt:['cn','nc']
				}
			}],
			rowNum : 10,
			rowList : [ 10, 20, 30 ],
			pager : '#loggridPager',
			sortname : 'id',
			viewrecords : true,
			jsonReader : {
				repeatitems : false
			},
			sortorder : "desc",
			caption : "日志列表"

		});
		jQuery("#loglist").jqGrid('navGrid', '#loggridPager', {
			edit : false,
			add : false,
			del : false
		}, {}, {}, {},{multipleSearch:true});
	});
	datePick = function(elem)
	{
	   jQuery(elem).datepicker();
	}

</script>
<body>
	<div align="center">
		<table id="loglist"></table>
		<div id="loggridPager"></div>
	</div>
</body>
</html>